<div layout="row" ng-show="showResult.data.length>0" layout-padding="">
  <md-input-container class="" ng-show="showResult.data.length>0" layout-padding>
    <label>选择要显示的字段</label>
    <md-select multiple ng-model="showItems">
      <md-option ng-repeat="i in subsetItems" ng-value="i.name" ng-selected="true">{{i.name}}</md-option>
    </md-select>
  </md-input-container>
  <md-input-container class="" ng-show="showResult.data.length>0" layout-padding>
    <md-checkbox ng-model="flag">
      去掉标签
    </md-checkbox>
  </md-input-container>
</div>
<h4>{{showResult.info}}</h4>
<md-table-container ng-show="showResult.data.length>0" layout-padding>
  <table md-table class="rule-group">
    <tr>
      <th width="5%">序号</th>
      <th width="30%" ng-repeat="show in showItems">{{show}}</th>
    </tr>
    <tr ng-repeat="article in showResult.data" ng-click="selectRes(article)" ng-dblclick="checkArticleDetail()" ng-class="{true: 'selected', false:'unselected'}[article==selectedResult]">
      <td>
        <p>
          {{$index+1}}
        </p>
      </td>
      <td ng-repeat="item in showItems">
        <p ng-repeat="list in article['result'][item]">
          {{list.text | ripTag:flag | limitTo:30}}
        </p>
      </td>
    </tr>
  </table>
</md-table-container>

<md-sidenav class="md-sidenav-right md-whiteframe-4dp" md-component-id="article-detail">
  <md-toolbar class="md-theme-light">
    <h4 class="md-toolbar-tools">文章详情</h4>
    <!-- <md-button class="close-sidenav" ng-click="">×</md-button> -->
  </md-toolbar>

  <md-content layout-padding>
    <form>
      <md-input-container class="md-block">
        <md-checkbox ng-model="sidenavFlag">
          去掉标签
        </md-checkbox>
      </md-input-container>
      <!-- {{showItems}} -->
      <div class="content">
        <div ng-repeat="i in subsetItems" layout-padding="">
          <h5>{{i.name}}</h5>
          <ul>
            <li ng-repeat="record in selectedResult['result'][i.name]">
              {{record.text | ripTag: sidenavFlag}}
            </li>
          </ul>
        </div>
      </div>
      <!-- <md-table-container layout-padding>
        <table md-table class="article-detail">
          <tr ng-repeat="i in showItems">
            <td width="10%">
              <label>{{i}}</label>
            </td>
            <td width="90%">
              <div ng-repeat="record in selectedResult['result'][i]">
                {{record.text | ripTag: sidenavFlag}}
              </div>
            </td>
          </tr>
        </table>
      </md-table-container> -->
    </form>
  </md-content>
</md-sidenav>
